Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

541
Vistas
pip: sys.stderr.write(f"ERROR: {exc}") with Python 3.5

i am having a trouble with pip and pip3. I am trying to install requirements and it shows an error. When i write pip3 or pip --version it show this error.

jumphost@jumphost-VirtualBox:~$ pip3 --version
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import __main__
  File "/usr/local/lib/python3.5/dist-packages/pip/__main__.py", line
21, in <module>
    from pip._internal.cli.main import main as _main
  File
"/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax

If i am trying to install, it showed this

jumphost@jumphost-VirtualBox:~/kubespray$ pip install -r requirements.txt
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    from pip import __main__
  File
"/usr/local/lib/python2.7/dist-packages/pip-21.0-py2.7.egg/pip/__main__.py",
line 21, in <module>
    from pip._internal.cli.main import main as _main
  File
"/usr/local/lib/python2.7/dist-packages/pip-21.0-py2.7.egg/pip/_internal/cli/main.py",
line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax
jumphost@jumphost-VirtualBox:~/kubespray$ pip3 install -r requirements.txt
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import __main__
  File "/usr/local/lib/python3.5/dist-packages/pip/__main__.py", line
21, in <module>
    from pip._internal.cli.main import main as _main
  File
"/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax

I didn't found a right answer so this is the reason why i ask you. Thanks ! I tried remove python, pip, python3 and pip3 multipletimes but still same problem.

over 4 years ago · Hanz Gallego
1 Respuestas
Responde la pregunta

0

pip has dropped support for Python 2 and 3.5. You will need to use a version-specific branch, assuming that your Python version is 3.5:

curl -fsSL https://bootstrap.pypa.io/pip/3.5/get-pip.py | python3.5

get-pip.py reference: https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py

Related: How can I install a legacy PIP version with python 2.6.6 or python 2.7.5?

Better yet, as suggested in the comments, install a newer version of Python that is not end-of-life.

over 4 years ago · Hanz Gallego Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda